
import request from '@/utils/request';
import { Result } from './definitions/Result';
import { UserSaveRequestEntity } from './definitions/UserSaveRequestEntity';
import { ResultUser } from './definitions/ResultUser';
import { WxSessionRequestEntity } from './definitions/WxSessionRequestEntity';


export class UserApiController {

    static updateUsingPUTPath: string = "/v1/shop/user";
    /// 更新我的资料
    async updateUsingPUT(data: UserSaveRequestEntity, headers?: any):  Promise<any> {
      return request(`/v1/shop/user`, {
        method: "PUT",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static getUsingGETPath: string = "/v1/shop/user/getUserInfo";

    async getUsingGET( headers?: any) : Promise<ResultUser> {
      return request(`/v1/shop/user/getUserInfo`, {
        method: "GET",
        headers: headers,
      }) as Promise<any>;
    }
    
    static wxLoginUsingPOSTPath: string = "/v1/shop/user/wxLogin";
    /// wxLogin
    async wxLoginUsingPOST(data: WxSessionRequestEntity, headers?: any):  Promise<any> {
      return request(`/v1/shop/user/wxLogin`, {
        method: "POST",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
}